/*
 * Player.h
 *
 *  Created on: 10-nov-2012
 *      Author: dna
 */

#ifndef PLAYER_H_
#define PLAYER_H_

#ifndef _LINUX_GL_LIBRARIES
#define _LINUX_GL_LIBRARIES

#include <GL/glut.h>    				// Header File For The GLUT Library
#include <GL/gl.h>						// Header File For The OpenGL32 Library
#include <GL/glu.h>						// Header File For The GLu32 Library

#endif

#include <cmath>

class Player {
private:
	GLfloat xpos;
	GLfloat ypos;
	GLfloat zpos;

	GLfloat xangle;
	GLfloat yangle;
	GLfloat zangle;

	GLfloat heading_h;
	GLfloat heading_v;

	bool f_bounce;

	GLuint speed;

	static float piover180;

	GLfloat walkbias;
	GLfloat walkbiasangle;

public:
	Player();
	virtual ~Player();

	GLvoid WalkForward();
	GLvoid WalkBackward();
	GLvoid StrafeLeft();
	GLvoid StrafeRight();

	GLvoid LookLeft();
	GLvoid LookRight();
	GLvoid LookUp();
	GLvoid LookDown();

	GLvoid ToggleBounce();

	GLvoid IncreaseSpeed(GLuint value);
	GLvoid DecreaseSpeed(GLuint value);

	GLfloat getWalkbiasangle() const {
		return walkbiasangle;
	}

	void setWalkbiasangle(GLfloat walkbiasangle) {
		this->walkbiasangle = walkbiasangle;
	}

	GLfloat getXpos() const {
		return xpos;
	}

	GLfloat getYpos() const {
		return ypos;
	}

	GLfloat getZpos() const {
		return zpos;
	}

	GLfloat gerWalkbias() const {
		return walkbias;
	}

	GLfloat getHeadingH() const {
		return heading_h;
	}

	GLfloat getHeadingV() const {
		return heading_v;
	}
};

#endif /* PLAYER_H_ */
